1. Field of the Invention
The present invention relates to a picture decoding, and more particularly, to device and method for processing a picture in an MPEG decoder which can reduce an amount of data to be stored in a memory.
2. Discussion of the Related Art
The techniques of video compression and multiplexing in the Grand Alliance system, which is the HDTV (High Definition TV) system of the U.S., follow the MPEG (Moving Picture Experts Group)-2 standards as they are. The standards for video format do not restrict to one video format, but allows different video formats in encoding and decoding. For example, there are a format with a 60 Hz field rate for a video source of 1080(V)* 1920(H) interlace scanning and formats with 24 Hz and 30 Hz frame rates for a video source of 720(V)* 1280(H) progressive scanning in the HDTV class, and there are formats with 24 Hz, 30 Hz and 60 Hz frame rates for a video source of 480(V)*720(H) interlace scanning and formats with 24 Hz, 30 Hz and 60 Hz frame rates for a video source of 480(V)*640(H) progressive scanning in the SDTV (NTSC) class. The HDTV class has an aspect ratio of 16:9 and the SDTV class have an aspect ratio of 16:9 or 4:3. Thus, though there are different video formats possible to receive, video formats possible to be displayed on a monitor, such as a TV receiver, will be in general limited to one or two to be consistent to the monitor feature, despite such a monitor can receive and display any video formats. Further, even if the HDTV broadcasting is started, since it is foreseen that the HDTV broadcasting and current NTSC or SDTV broadcasting coexist for a substantial period of time, it is required that they have to have an interchangeability. That is, if a monitor has a display standard of an SD class while a video source has an HD class, a video format conversion from the HD class to the SD class will be required. Similarly, a video format conversion of a video with an aspect ratio of 16:9 for display on a monitor with an aspect ratio of 4:3 will also be required, and vice versa. Thus, if a display format, i.e., a display size and a video source size are different from each other, a video format conversion is required.
A system of a background art MPEG decoder for conducting this is illustrated in FIG. 1, wherein the MPEG decoder 10 in general uses an external memory 20 provided with a buffer for temporary storage of a bit stream and a frame memory. The MPEG decoder 10 is provided with an interfacing part 11 for interfacing an encoded bit stream with the external memory 20, a memory controlling part 12 for controlling data input/output from/to the external memory 20 and the MPEG decoder 10, a video decoder 13 for decoding the bit stream stored in the external memory 20 and storing decoded pixel data in the external memory 20, and a video presenting part 14 for processing a signal of the pixel data stored in the external memory such that the pixel data is displayable on a display 30 and converting a format of a video source if formats of the video source and the display 30 are different from each other.
FIG. 2 illustrates an operation flow chart of the MPEG decoder 10 shown in FIG. 1.
Referring to FIGS. 1 and 2, when an encoded bit stream is transmitted and received at the MPEG decoder 10, the bit stream is stored in the external memory 20 through the interfacing part 11. Then, the video decoding part 13 reads the bit stream from the external memory, decodes (step 201), and stores the bit stream in the external memory 20, again (step 202). That is, the video decoding part 13 removes overheads (various header information, start codes and etc.) from the received bit stream and conducts a VLD (Variable Length Decoding) of pure data information to restore the bit stream into pixels of an original image through an inverse quantizing process, inverse discrete cosine transformation (IDCT) and motion vector using motion compensation process. In this instance, all data input/output from/to the external memory 20 and the MPEG decoder 10 are conducted under the control of the memory controlling part 12. The external memory 20 is required for writing and reading of the bit stream for variable length decoding, data reading for motion compensation, and writing a decoded data and reading a data to be displayed, and because an order (I, P, B, B) of pictures to be decoded and an order (I, B, B, P) of pictures to be displayed are different. The image presenting part 14 reads the pixel data of a picture, decoded in the video decoding part 13 and stored in the external memory 20, in an order of display, processes signals to be displayable on a screen (step 203), converts a video format if the video source and display 30 are different in numbers of display pixels, data transmission rates, or aspect ratios, and presents to the display 30. That is, the image presenting part 14 determines a display size and a video source size of being different from each other after processing the signal (step 204). The size herein may denote a number of pixels, an aspect ratio of the image, or a data transmission rate, called a frame rate. It the display size and the source size are determined to be identical in the step 204, the data signal processed are presented to, and displayed on the display 30 without any conversion of video format (step 205). On the other hand, if determined different in the step 204, the display size is compared to the video source size whether the display size is greater or smaller than the video source size (step 206). If it is determined that the display size is greater than the video source size in the step 206, for example, the display has an aspect ratio of 16:9 while the video source has an aspect ratio of 4:3, or the display is an HD class while the video source is an SD class, the decoded I, P, B pictures are subjected to operations such as pixel interpolations respectively and present to the display 30 (step 207). If determined that the display size is smaller than the video source size in the step 206, that is, it is opposite to the step 207, the decoded I, P, B pictures are subjected to data reduction operations such as pixel filtering respectively and present to the display 30 (step 208). As there are many known video format converting techniques, some of the techniques may be used.
FIG. 3 illustrates one of the video format converting technique, wherein a letter box processing is made, in which a video signal with a 16:9 aspect ratio is converted into a video signal with 4:3 aspect ratio. In the method of converting a video signal with a 16:9 aspect ratio is converted into a video signal with 4:3 aspect ratio, there are, other than the letter box processing, the pan scan method in which opposite sides of a decoded data are cut away to make an aspect ratio of 4:3 or a method in which a 16:9 image is compressed in a horizontal direction to convert it into an aspect ratio of 4:3.
FIG. 4 illustrates an example of a letter box filtering for preventing an image from being distorted when an image of 16:9 aspect ratio is displayed on a TV of 4:3 aspect ratio, in which 3 scan lines are presented per every 4 samples. That is, in the letter box filtering, an upper and a lower pixels in a frame is interpolated to adjust a number of the pixels; pixels in a vertical direction in a frame are interpolated, to call it as a vertical filtering. This vertical filtering leads a number of pixels reduced to 3/4 compared to a number of pixels in a frame of an original image. Therefore, in the case of letter box processing, a rate of data transmitted from the image presenting part 14 to the display 30 is reduced to 3/4 compared to a rate of data transmitted from the video decoding part 13 to the image presenting part 14 through the external memory 30. In this instance, the filtering coefficients shown in FIG. 4 may be different depending on methods of implementation. Thus, in the background art, a video format conversion, like the letter box processing, is conducted in the image presenting part 14, i.e., a device which displays an image restored into an original state as the decoding finished.
Accordingly, the background art MPEG decoder has the following problems.
First, since a video format conversion, like the letter box processing, is conducted in the image presenting part, which is a final step in the MPEG decoder, the rate of data transmission up to this step has been exceedingly great compared to a rate of data presented finally, particularly, such a drawback is significant in a B-picture which has a great rate of motion compensation data transmission. That is, though an I or P picture demands a small size of memory bandwidth, which represents a data transmission rate, a B-picture demands a great size of memory bandwidth because the B-picture requires data on both forward and backward pictures for a motion compensation. Because a number of memory ports is limited, that is one possibility of solving this problem, a clock frequency should be increased, that makes implementation difficult and costs high.
Second, in the case of restored B-picture image stored in the external memory, though an amount of data actually presented to the display is no more than 3/4 of the pixels stored in the memory, because all the data is stored in the external memory, with an increased memory bandwidth, an efficiency of a memory use is low.
Third, for reducing a data transmission rate in the case of a transmission rate increase of memory data, like the case of a B-picture processing, as the image presenting part reads a pixel data of one scanning line as a basic unit and subject the pixel data to a letter box processing, a separate buffer for storing the read pixel data is required to use, which results in an increase of a size of the MPEG decoder.